package com.hakim.wfb.customer.enums;

/**
 * 座位类型
 * Created by caochong on 2016/6/13.
 */
public enum SeatTypeEnum {
    Normal("N", "普通座位"),
    Disabled("W", "残疾人座位"),
    Couple_L("L", "情侣座左座"),
    Couple_R("R", "情侣座右座"),
    Reserved("H", "保留座位"),
    Shock("Z", "震动座位"),

    Damage("D", "已损坏座位"),
    Saled("LK", "已售座位"),
    Empty("E", "空白座位"),
    ;

    private String code;

    private String message;

    private SeatTypeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    public static SeatTypeEnum getByCode(String code) {
        if (code != null) {
            SeatTypeEnum[] codes = values();
            for (SeatTypeEnum each : codes) {
                if (each.code.equals(code)) {
                    return each;
                }
            }
        }
        return null;
    }
}
